<?php
//echo 'project_id: '.$project_id;
if ($_POST['project_id'] <> NULL) { //to detect if posted
$project_id = $_POST['project_id'];
$marker_id = $_POST['marker_id'];

$title = json_decode($_POST['title']);
$txt = json_decode($_POST['editor1']);
$lnk = json_decode($_POST['lnk']);

$query = "UPDATE markers SET title = '$title', txt = '$txt', lnk = '$lnk' WHERE (ident = '$marker_id' AND project = '$project_id')";
$result = mysql_query($query);
if ( !$result )
{
	echo ( "<P>Error updating project - save_marker.php: " . mysql_error() . "</P>" );
}
//echo ' performed update: project_id= '.$project_id.' marker_id= '.$marker_id;

} //top if

?>
